﻿@model ShoppingCartModel.OrderReviewDataModel
@using Nop.Web.Models.ShoppingCart;
@if (Model.Display)
{
    <div class="row">
        <div class="col-md-6 box-block">
            <div class="box-heading">
                <strong>@T("Order.BillingAddress")</strong>
            </div>
            <div class="box-content feature-box">
                <div class="name">
                    @Model.BillingAddress.FirstName @Model.BillingAddress.LastName
                </div>
                <div class="">
                    @T("Order.Email"): @Model.BillingAddress.Email
                </div>
                @if (Model.BillingAddress.PhoneEnabled)
                {
                    <div class="phone">
                        @T("Order.Phone"): @Model.BillingAddress.PhoneNumber
                    </div>
                }
                @if (Model.BillingAddress.FaxEnabled)
                {
                    <div class="fax">
                        @T("Order.Fax"): @Model.BillingAddress.FaxNumber
                    </div>
                }
                @if (Model.BillingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.BillingAddress.Company))
                {
                    <div class="company">
                        @Model.BillingAddress.Company
                    </div>
                }
                @if (Model.BillingAddress.StreetAddressEnabled)
                {
                    <div class="address1">
                        @Model.BillingAddress.Address1
                    </div>
                }
                @if (Model.BillingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.BillingAddress.Address2))
                {
                    <div class="address2">
                        @Model.BillingAddress.Address2
                    </div>
                }
                @if (Model.BillingAddress.CityEnabled ||
                     Model.BillingAddress.StateProvinceEnabled ||
                     Model.BillingAddress.ZipPostalCodeEnabled)
                {
                    <div class="city-state-zip">
                        @if (Model.BillingAddress.CityEnabled)
                        {
                            @Model.BillingAddress.City
                        }
                        @if (Model.BillingAddress.CityEnabled && (Model.BillingAddress.StateProvinceEnabled || Model.BillingAddress.ZipPostalCodeEnabled))
                        {
                            <text>,</text>
                        }
                        @if (Model.BillingAddress.StateProvinceEnabled)
                        {
                            @Model.BillingAddress.StateProvinceName
                        }
                        @if (Model.BillingAddress.ZipPostalCodeEnabled)
                        {
                            @Model.BillingAddress.ZipPostalCode
                        }
                    </div>
                }
                @if (Model.BillingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.BillingAddress.CountryName))
                {
                    <div class="country">
                        @Model.BillingAddress.CountryName
                    </div>
                }
            </div>
            <br />
            @if (!String.IsNullOrEmpty(Model.PaymentMethod))
            {
                <div class="box-heading">
                    <strong>@T("Order.Payment")</strong>
                </div>
                <div class="box-content feature-box">
                    <span class="label">
                        @T("Order.Payment.Method"):
                    </span>
                    <span class="value">
                        @Model.PaymentMethod
                    </span>
                </div>
            }
            @if (Model.CustomValues != null)
            {
                foreach (var item in Model.CustomValues)
                {
                    <div class="custom-value">
                        <span class="label">
                            @item.Key:
                        </span>
                        <span class="value">
                            @(item.Value != null ? item.Value.ToString() : "")
                        </span>
                    </div>
                }
            }
        </div>
        @if (Model.IsShippable)
        {
            <div class="col-md-6 box-block">
                <div class="box-heading">
                    <strong>
                        @T("Order.ShippingAddress")
                    </strong>
                </div>
                <div class="box-content feature-box">
                    <div class="name">
                        @Model.ShippingAddress.FirstName @Model.ShippingAddress.LastName
                    </div>
                    <div class="">
                        @T("Order.Email"): @Model.ShippingAddress.Email
                    </div>
                    @if (Model.ShippingAddress.PhoneEnabled)
                    {
                        <div class="phone">
                            @T("Order.Phone"): @Model.ShippingAddress.PhoneNumber
                        </div>
                    }
                    @if (Model.ShippingAddress.FaxEnabled)
                    {
                        <div class="fax">
                            @T("Order.Fax"): @Model.ShippingAddress.FaxNumber
                        </div>
                    }
                    @if (Model.ShippingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.Company))
                    {
                        <div class="company">
                            @Model.ShippingAddress.Company
                        </div>
                    }
                    @if (Model.ShippingAddress.StreetAddressEnabled)
                    {
                        <div class="address1">
                            @Model.ShippingAddress.Address1
                        </div>
                    }
                    @if (Model.ShippingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.ShippingAddress.Address2))
                    {
                        <div class="address2">
                            @Model.ShippingAddress.Address2
                        </div>
                    }
                    @if (Model.ShippingAddress.CityEnabled ||
                         Model.ShippingAddress.StateProvinceEnabled ||
                         Model.ShippingAddress.ZipPostalCodeEnabled)
                    {
                        <div class="city-state-zip">
                            @if (Model.ShippingAddress.CityEnabled)
                            {
                                @Model.ShippingAddress.City
                            }
                            @if (Model.ShippingAddress.CityEnabled && (Model.ShippingAddress.StateProvinceEnabled || Model.ShippingAddress.ZipPostalCodeEnabled))
                            {
                                <text>,</text>
                            }
                            @if (Model.ShippingAddress.StateProvinceEnabled)
                            {
                                @Model.ShippingAddress.StateProvinceName
                            }
                            @if (Model.ShippingAddress.ZipPostalCodeEnabled)
                            {
                                @Model.ShippingAddress.ZipPostalCode
                            }
                        </div>
                    }

                    @if (Model.ShippingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.CountryName))
                    {
                        <div class="country">
                            @Model.ShippingAddress.CountryName
                        </div>
                    }
                </div>
                <br />

                <div class="box-heading">
                    <strong>@T("Order.Shipping")</strong>
                </div>
                <div class="box-content feature-box">
                    <span class="label">
                        @T("Order.Shipping.Name"):
                    </span>
                    <span class="value">
                        @Model.ShippingMethod
                    </span>
                </div>
            </div>
        }
    </div>
    <br />
}